package root;

public class call_funtion {
	public static void main(String[] args)
	{
		Three tree = new Three();
		
		int num = 5;
		for(int k = 0; k < num; k++)
		{
			int number = (int) (Math.random()*num*2-num);
			System.out.print(number + ",");
			tree.add(number);
		}
		
		tree.printTree();
		System.out.println("Remove: " + 4 + " : " + tree.remove(4));

		int search = (int) (Math.random()*num*2-num);
		int searchNum = tree.search(search).num;
		System.out.println("Search: " + search);
		System.out.println("Search Num: " + searchNum);
		System.out.println("Remove: " + searchNum + " : " + tree.remove(searchNum));
		System.out.println("Remove: " + searchNum/2 + " : " + tree.remove(searchNum/2));
		System.out.println("Min: " + tree.getMin());
		System.out.println("Max: " + tree.getMax());
		
		tree.printTree();
	}
}
